<?php
	
	if(isset($_GET['platid']))
	   $platid=intval($_GET['platid']);
	else 
	   edp_redirect(edp_href_link(PAGENAME_PAGE_NOT_FOUND));
	 
	$shopDAO=GetShopDAO();
	$platformName=$shopDAO->GetShopPlatform($platid);
	
	if($platformName==false||$platid>100)
		edp_redirect(edp_href_link(PAGENAME_PAGE_NOT_FOUND));
	
	$count=$shopDAO->GetShopCount($platid); //店铺数量，需要缓存
	$shopCategoryDAO = GetShopCategoryDAO();	
	$productDAO=GetProductDAO();
				
	$cateMapping=EdpGetAllShopCateMapping();
	$hotProductList=$productDAO->GetHotProductByPlatid($platid, 5);//热门商品	

	if($platid==100)
	{//商城	
		$newAddMallList=$shopDAO->GetShopByCreatetime($platid, 12);//最新添加商城
		TransferTo('platform_b2c');
	}
	else
	{//C2C
		
		$listDAO=GetListDAO();
		$reviewDAO=GetReviewDAO();
		$userDAO = GetUserDAO();
		
		$hotShopList=$shopDAO->GetHotShopByPlatid($platid, 8);//热门店铺
		$hotListList=$listDAO->GetHotList();//热门评单
		$recentReviewList=$reviewDAO->GetRecentReviewByPlatid($platid, 10);

		switch($platid){
			
			case '0': {
				
				TransferTo('platform_unknown');
				break;
			}
	
			case '1': {
				TransferTo('platform_taobao');
				break;
			}
	
			case '2': {
				
				TransferTo('platform_eachnet');
				break;
			}		
	
			case '3': {
				
				TransferTo('platform_paipai');
				break;
			}
	
			case '4': {
				
				TransferTo('platform_youa');
				break;
			}	
			default:
			{
				edp_redirect(edp_href_link(PAGENAME_PAGE_NOT_FOUND));
				break;
			}
		}			
		
	}
	
	
?>
